package com.sl.hx.shop.utils;


import com.sl.hx.shop.bean.ProductList;

import java.util.List;

public class UserDataManager {
    private static String KEY_USER_INFO = "history_data";

    /**
     * Save getCompanyList info.
     *
     * @param loginRes the getCompanyList res
     */
    public static void saveHistory(List<ProductList> loginRes) {
        PreferencesUtils.saveObject(KEY_USER_INFO, loginRes);
    }

    /**
     * Gets getCompanyList info.
     *
     * @return the getCompanyList info
     */
    public static List<ProductList> getHistory() {
        return (List<ProductList>) PreferencesUtils.getObject(KEY_USER_INFO, null);
    }



    public static void clearHisotory() {
        saveHistory(null);
    }

}
